#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
    char a;
    while(cin>>a){
        if(a>='a'&&a<='z')cout<<(char)(a-32)<<endl;
        else cout<<(char)(a+32)<<endl;
    }
    return 0;
}
